#!M:/WinPython-64bit-3.4.4.3Qt5/python-3.4.4.amd64/python.exe
#coding=utf-8

print("Content-Type:text/html;Charset:UTF-8\n\n")

import cgi,cgitb
import os
cgitb.enable()
fm=cgi.FieldStorage()
fp='uploads'
if not os.path.exists(fp):
    os.mkdir(fp)
for item in fm:
    with open(os.path.join(fp,fm[item].filename),'wb') as f:
        f.write(fm[item].file.read())

